package com.ai.bitcoin.controller;

import com.ai.bitcoin.service.MakeHtmlService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RequestMapping("/schedule")
@Slf4j
@RestController
public class ScheduleJobController {

    @Resource(name="makeHtmlService")
    private MakeHtmlService makeHtmlService;

    @RequestMapping(value="/report", method= RequestMethod.GET, produces = {"application/json;charset=UTF-8" })
    public void report(HttpServletRequest request) {
        makeHtmlService.generateReport();
    }

}
